package com.ara.account.retrofit;

import android.content.Intent;

import com.alibaba.android.arouter.launcher.ARouter;
import com.ara.account.constant.AccountRouterApiConstant;

/**
 * Created by XieXin on 2019/1/15.
 * 路由api
 */
public class AccountRouterApiHolder {
    /**
     * 跳转到登录页面
     */
    public static void jumpLoginActivity() {
        ARouter.getInstance().build(AccountRouterApiConstant.API_LOGIN).navigation();
    }

    /**
     * 跳转到登录页面
     */
    public static void jumpLoginActivity(boolean isLogout) {
        ARouter.getInstance()
                .build(AccountRouterApiConstant.API_LOGIN)
                .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK)
                .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
                .withBoolean("isLogout", isLogout)
                .navigation();
    }

    /**
     * 跳转到主页
     */
    public static void jumpMainActivity() {
        ARouter.getInstance()
                .build("/main/Main")
                .navigation();
    }
}
